package io.github.neo.hhcache.command.common;

import io.github.neo.hhcache.core.Command;
import io.github.neo.hhcache.core.HHCache;
import io.github.neo.hhcache.entry.Reply;

/**
 * @author: hhz
 * @create: 2024/7/10
 **/
public class InfoCommand implements Command {

    private static final String INFO = "HHCache server[v1.0.0], created by hh." + CRLF
            + "Mock Redis Server at 2024-06-12 in beijing." + CRLF;
    @Override
    public String name() {
        return "INFO";
    }

    @Override
    public Reply<?> exec(HHCache cache, String[] args) {
        return Reply.bulkString(INFO);
    }
}
